﻿using System;
using System.Linq;
using DAL;
using Entity;
using Utils;
using Library;
using DataContext;
using System.Collections.Generic;

namespace PaymentBLL
{
    public class CtrPaymentGateway
    {

        public List<uspPaymentGatewaySelelctAllResult> SelectAllPaymentGateway()
        {
            return DB.PaymentInstance.uspPaymentGatewaySelelctAll().ToList();
        }

        public uspPaymentGatewaySelectResult SelectPaymentGetway(int id)
        {
            return DB.PaymentInstance.uspPaymentGatewaySelect(id).FirstOrDefault();
        }

        public int UpdatePaymentGatewayIn(int id, double amountIn, int vndIn, int maxVndIn, double receiveAu, double receiveAg, bool isActiveIn)
        {
            return DB.PaymentInstance.uspPaymentGatewayUpdateIn(id, amountIn, vndIn, maxVndIn, receiveAu, receiveAg, isActiveIn);
        }

        public int UpdatePaymentGatewayOut(int id, double auOut, double agOut, double receiveAmount, int vndOut, int maxVndOut, bool isActiveOut)
        {
            return DB.PaymentInstance.uspPaymentGatewayUpdateOut(id, auOut, agOut, receiveAmount, vndOut, maxVndOut, isActiveOut);
        }
    }
}
